package com.engine4cloud.tdf.supervision.dto.create;

import com.engine4cloud.tdf.supervision.dto.JzdxCrimeInfoDTO;
import com.engine4cloud.tdf.supervision.dto.JzdxFileDTO;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotEmpty;
import jakarta.validation.constraints.NotNull;
import lombok.Data;

import java.io.Serializable;
import java.time.LocalDate;
import java.util.List;

/**
 * 社区矫正人员基本信息-请求对象
 *
 * @author wenjie
 * @date 2024-03-14 11:20:26
 */
@Data
@Schema(description = "社区矫正人员基本信息-请求对象")
public class JzdxCreateDTO implements Serializable {

    /**
     * 矫正类别
     */
    @Schema(description = "矫正类别", example = "01")
    @NotBlank(message = "矫正类别不能为空")
    private String jzlb;

    /**
     * 是否成年
     */
    @Schema(description = "是否成年", example = "1")
    @NotBlank(message = "是否成年不能为空")
    private String sfcn;

    /**
     * 未成年年龄范围
     */
    @Schema(description = "未成年年龄范围-注：当是否成年选择了‘否’时，未成年年龄范围必填", example = "01")
    private String wcn;

    /**
     * 姓名
     */
    @Schema(description = "姓名", example = "张三")
    @NotBlank(message = "姓名不能为空")
    private String xm;

    /**
     * 曾用名
     */
    @Schema(description = "曾用名", example = "张老三")
    private String cym;

    /**
     * 性别
     */
    @Schema(description = "性别", example = "1")
    @NotBlank(message = "性别不能为空")
    private String xb;

    /**
     * 证件类型
     */
    @Schema(description = "证件类型", example = "01")
    @NotBlank(message = "证件类型不能为空")
    private String zjlx;

    /**
     * 证件号
     */
    @Schema(description = "证件号", example = "610222222222222222")
    @NotBlank(message = "证件号不能为空")
    private String zjh;

    /**
     * 民族
     */
    @Schema(description = "民族", example = "01")
    @NotBlank(message = "民族不能为空")
    private String mz;

    /**
     * 出生日期
     */
    @Schema(description = "出生日期")
    @NotNull(message = "出生日期不能为空")
    private LocalDate csrq;

    /**
     * 文化程度
     */
    @Schema(description = "文化程度", example = "01")
    @NotBlank(message = "文化程度不能为空")
    private String whcd;

    /**
     * 婚姻状况
     */
    @Schema(description = "婚姻状况", example = "01")
    @NotBlank(message = "婚姻状况不能为空")
    private String hyzk;

    /**
     * 现政治面貌
     */
    @Schema(description = "现政治面貌", example = "01")
    @NotBlank(message = "现政治面貌不能为空")
    private String xzzmm;

    /**
     * 原政治面貌
     */
    @Schema(description = "原政治面貌", example = "01")
    @NotBlank(message = "现政治面貌不能为空")
    private String yzzmm;

    /**
     * 个人联系电话
     */
    @Schema(description = "个人联系电话", example = "177****7711")
    @NotBlank(message = "个人联系电话不能为空")
    private String grlxdh;

    /**
     * 有无家庭成员及主要社会关系
     */
    @Schema(description = "有无家庭成员及主要社会关系", example = "1")
    @NotBlank(message = "有无家庭成员及主要社会关系不能为空")
    private String yxjtcyjzyshgx;

    /**
     * 户籍地是否与居住地相同
     */
    @Schema(description = "户籍地是否与居住地相同", example = "1")
    @NotBlank(message = "户籍地是否与居住地相同不能为空")
    private String hjdsfyjzdxt;

    /*
     * 固定居住地明细
     */
    @Schema(description = "固定居住地明细")
    @NotBlank(message = "固定居住地明细不能为空")
    private String gdjzdmx;

    /**
     * 国家
     */
    @Schema(description = "国家（注：本次新增字段）", example = "156")
    @NotBlank(message = "国家不能为空")
    private String guojia;

    /**
     * 户籍所在地明细
     */
    @Schema(description = "户籍所在地明细")
    @NotBlank(message = "户籍所在地明细不能为空")
    private String hjszdmx;

    /**
     * 备注
     */
    @Schema(description = "备注")
    private String bz;

    /**
     * 证件信息
     */
    @Schema(description = "证件信息")
    @NotNull(message = "证件信息不能为空")
    private JzdxIdentityCreateDTO identity;

    /**
     * 身体状况
     */
    @Schema(description = "身体状况")
    @NotNull(message = "身体状况不能为空")
    private JzdxPhysicalConditionCreateDTO physicalCondition;

    /**
     * 就业就学信息
     */
    @Schema(description = "就业就学信息")
    @NotNull(message = "就业就学信息不能为空")
    private JzdxEmploymentCreateDTO employment;

    /**
     * 国籍（户籍）
     */
    @Schema(description = "国籍（户籍，树结构需要传父和子）", example = "[\"01\",\"10\",\"12\"]")
    @NotEmpty(message = "国籍（户籍）不能为空")
    private List<String> nativePlaceList;

    /**
     * 固定居住地
     */
    @Schema(description = "固定居住地", example = "[\"460000\",\"46000A\",\"469006\",\"36327\"]")
    @NotEmpty(message = "固定居住地不能为空")
    private List<String> residenceAreaList;

    /**
     * 户籍居住地
     */
    @Schema(description = "户籍居住地", example = "[\"460000\",\"46000A\",\"469006\",\"36327\"]")
    @NotEmpty(message = "户籍居住地不能为空")
    private List<String> registerAreaList;

    /**
     * 照片
     */
    @Schema(description = "照片",
            example = """
                    [{"name": "09468fc20f2544e28891a058858fdf58.png",
                    "url": "/supervision/oss-file/oss/file?fileName=09468fc20f2544e28891a058858fdf58.jpeg"}
                    ]""")
    @NotEmpty(message = "照片不能为空")
    private List<JzdxFileDTO> photoList;

    /**
     * 罪名不能为空，根据罪名可以获取犯罪类型
     */
    @Schema(description = "罪名", example = "[{\"jtzm\": \"15\",\"zmmc\": \"纵火罪\"}]")
    @NotEmpty(message = "罪名不能为空")
    private List<JzdxCrimeInfoDTO> crimeInfoList;
}